/******************************************************************************* * Copyright (c) 2012, Project: FP7-ICT-257930 Aniketos * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * - Neither the name of institution nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ******************************************************************************/ /** */ package eu.aniketos.mtm.mapping.util; import eu.aniketos.mtm.mapping.*; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.util.Switch; /** * <!-- begin-user-doc --> * The <b>Switch</b> for the model's inheritance hierarchy. * It supports the call {@link #doSwitch(EObject) doSwitch(object)} * to invoke the <code>caseXXX</code> method for each class of the model, * starting with the actual class of the object * and proceeding up the inheritance hierarchy * until a non-null result is returned, * which is the result of the switch. * <!-- end-user-doc --> * @see eu.aniketos.mtm.mapping.MappingPackage * @generated */ public class MappingSwitch<T> extends Switch<T> { /** * The cached model package * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected static MappingPackage modelPackage; /** * Creates an instance of the switch. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public MappingSwitch() { if (modelPackage == null) { modelPackage = MappingPackage.eINSTANCE; } } /** * Checks whether this is a switch for the given package. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @parameter ePackage the package in question. * @return whether this is a switch for the given package. * @generated */ @Override protected boolean isSwitchFor(EPackage ePackage) { return ePackage == modelPackage; } /** * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the first non-null result returned by a <code>caseXXX</code> call. * @generated */ @Override protected T doSwitch(int classifierID, EObject theEObject) { switch (classifierID) { case MappingPackage.ACTIVITY_TYPE: { ActivityType activityType = (ActivityType)theEObject; T result = caseActivityType(activityType); if (result == null) result = defaultCase(theEObject); return result; } case MappingPackage.ACTIVITY_VAR: { ActivityVar activityVar = (ActivityVar)theEObject; T result = caseActivityVar(activityVar); if (result == null) result = defaultCase(theEObject); return result; } case MappingPackage.ACTOR_TYPE: { ActorType actorType = (ActorType)theEObject; T result = caseActorType(actorType); if (result == null) result = defaultCase(theEObject); return result; } case MappingPackage.BPP_TYPE: { BPPType bppType = (BPPType)theEObject; T result = caseBPPType(bppType); if (result == null) result = caseParticipantType(bppType); if (result == null) result = defaultCase(theEObject); return result; } case MappingPackage.BPR_TYPE: { BPRType bprType = (BPRType)theEObject; T result = caseBPRType(bprType); if (result == null) result = caseParticipantType(bprType); if (result == null) result = defaultCase(theEObject); return result; } case MappingPackage.CONFIDENTIALITY_TYPE: { ConfidentialityType confidentialityType = (ConfidentialityType)theEObject; T result = caseConfidentialityType(confidentialityType); if (result == null) result = defaultCase(theEObject); return result; } case MappingPackage.DOC_TYPE: { DocType docType = (DocType)theEObject; T result = caseDocType(docType); if (result == null) result = defaultCase(theEObject); return result; } case MappingPackage.DOCUMENT_ROOT: { DocumentRoot documentRoot = (DocumentRoot)theEObject; T result = caseDocumentRoot(documentRoot); if (result == null) result = defaultCase(theEObject); return result; } case MappingPackage.GOAL_TYPE: { GoalType goalType = (GoalType)theEObject; T result = caseGoalType(goalType); if (result == null) result = defaultCase(theEObject); return result; } case MappingPackage.INTEGRITY_TYPE: { IntegrityType integrityType = (IntegrityType)theEObject; T result = caseIntegrityType(integrityType); if (result == null) result = defaultCase(theEObject); return result; } case MappingPackage.ISA_TYPE: { IsaType isaType = (IsaType)theEObject; T result = caseIsaType(isaType); if (result == null) result = defaultCase(theEObject); return result; } case MappingPackage.MAPPING_TYPE: { MappingType mappingType = (MappingType)theEObject; T result = caseMappingType(mappingType); if (result == null) result = defaultCase(theEObject); return result; } case MappingPackage.PARTICIPANT_TYPE: { ParticipantType participantType = (ParticipantType)theEObject; T result = caseParticipantType(participantType); if (result == null) result = defaultCase(theEObject); return result; } case MappingPackage.PERMISSION_TYPE: { PermissionType permissionType = (PermissionType)theEObject; T result = casePermissionType(permissionType); if (result == null) result = defaultCase(theEObject); return result; } case MappingPackage.PLAYS_TYPE: { PlaysType playsType = (PlaysType)theEObject; T result = casePlaysType(playsType); if (result == null) result = defaultCase(theEObject); return result; } case MappingPackage.RELATES_TO_TYPE: { RelatesToType relatesToType = (RelatesToType)theEObject; T result = caseRelatesToType(relatesToType); if (result == null) result = defaultCase(theEObject); return result; } case MappingPackage.REPRESENTS_TYPE: { RepresentsType representsType = (RepresentsType)theEObject; T result = caseRepresentsType(representsType); if (result == null) result = defaultCase(theEObject); return result; } case MappingPackage.SO_DBO_DTYPE: { SoDBoDType soDBoDType = (SoDBoDType)theEObject; T result = caseSoDBoDType(soDBoDType); if (result == null) result = defaultCase(theEObject); return result; } case MappingPackage.SRA_TYPE: { SRAType sraType = (SRAType)theEObject; T result = caseSRAType(sraType); if (result == null) result = caseActorType(sraType); if (result == null) result = defaultCase(theEObject); return result; } case MappingPackage.SRR_TYPE: { SRRType srrType = (SRRType)theEObject; T result = caseSRRType(srrType); if (result == null) result = caseActorType(srrType); if (result == null) result = defaultCase(theEObject); return result; } case MappingPackage.THREATS_MAPPING: { ThreatsMapping threatsMapping = (ThreatsMapping)theEObject; T result = caseThreatsMapping(threatsMapping); if (result == null) result = defaultCase(theEObject); return result; } case MappingPackage.THREAT_TYPE: { ThreatType threatType = (ThreatType)theEObject; T result = caseThreatType(threatType); if (result == null) result = defaultCase(theEObject); return result; } case MappingPackage.VAR_TYPE: { VarType varType = (VarType)theEObject; T result = caseVarType(varType); if (result == null) result = defaultCase(theEObject); return result; } default: return defaultCase(theEObject); } } /** * Returns the result of interpreting the object as an instance of '<em>Activity Type</em>'. * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> * @param object the target of the switch. * @return the result of interpreting the object as an instance of '<em>Activity Type</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseActivityType(ActivityType object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Activity Var</em>'. * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> * @param object the target of the switch. * @return the result of interpreting the object as an instance of '<em>Activity Var</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseActivityVar(ActivityVar object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Actor Type</em>'. * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> * @param object the target of the switch. * @return the result of interpreting the object as an instance of '<em>Actor Type</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseActorType(ActorType object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>BPP Type</em>'. * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> * @param object the target of the switch. * @return the result of interpreting the object as an instance of '<em>BPP Type</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseBPPType(BPPType object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>BPR Type</em>'. * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> * @param object the target of the switch. * @return the result of interpreting the object as an instance of '<em>BPR Type</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseBPRType(BPRType object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Confidentiality Type</em>'. * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> * @param object the target of the switch. * @return the result of interpreting the object as an instance of '<em>Confidentiality Type</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseConfidentialityType(ConfidentialityType object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Doc Type</em>'. * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> * @param object the target of the switch. * @return the result of interpreting the object as an instance of '<em>Doc Type</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseDocType(DocType object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Document Root</em>'. * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> * @param object the target of the switch. * @return the result of interpreting the object as an instance of '<em>Document Root</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseDocumentRoot(DocumentRoot object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Goal Type</em>'. * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> * @param object the target of the switch. * @return the result of interpreting the object as an instance of '<em>Goal Type</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseGoalType(GoalType object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Integrity Type</em>'. * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> * @param object the target of the switch. * @return the result of interpreting the object as an instance of '<em>Integrity Type</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseIntegrityType(IntegrityType object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Isa Type</em>'. * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> * @param object the target of the switch. * @return the result of interpreting the object as an instance of '<em>Isa Type</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseIsaType(IsaType object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Type</em>'. * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> * @param object the target of the switch. * @return the result of interpreting the object as an instance of '<em>Type</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseMappingType(MappingType object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Participant Type</em>'. * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> * @param object the target of the switch. * @return the result of interpreting the object as an instance of '<em>Participant Type</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseParticipantType(ParticipantType object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Permission Type</em>'. * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> * @param object the target of the switch. * @return the result of interpreting the object as an instance of '<em>Permission Type</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T casePermissionType(PermissionType object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Plays Type</em>'. * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> * @param object the target of the switch. * @return the result of interpreting the object as an instance of '<em>Plays Type</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T casePlaysType(PlaysType object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Relates To Type</em>'. * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> * @param object the target of the switch. * @return the result of interpreting the object as an instance of '<em>Relates To Type</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseRelatesToType(RelatesToType object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Represents Type</em>'. * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> * @param object the target of the switch. * @return the result of interpreting the object as an instance of '<em>Represents Type</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseRepresentsType(RepresentsType object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>So DBo DType</em>'. * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> * @param object the target of the switch. * @return the result of interpreting the object as an instance of '<em>So DBo DType</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseSoDBoDType(SoDBoDType object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>SRA Type</em>'. * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> * @param object the target of the switch. * @return the result of interpreting the object as an instance of '<em>SRA Type</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseSRAType(SRAType object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>SRR Type</em>'. * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> * @param object the target of the switch. * @return the result of interpreting the object as an instance of '<em>SRR Type</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseSRRType(SRRType object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Threats Mapping</em>'. * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> * @param object the target of the switch. * @return the result of interpreting the object as an instance of '<em>Threats Mapping</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseThreatsMapping(ThreatsMapping object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Threat Type</em>'. * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> * @param object the target of the switch. * @return the result of interpreting the object as an instance of '<em>Threat Type</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseThreatType(ThreatType object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>Var Type</em>'. * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> * @param object the target of the switch. * @return the result of interpreting the object as an instance of '<em>Var Type</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseVarType(VarType object) { return null; } /** * Returns the result of interpreting the object as an instance of '<em>EObject</em>'. * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch, but this is the last case anyway. * <!-- end-user-doc --> * @param object the target of the switch. * @return the result of interpreting the object as an instance of '<em>EObject</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) * @generated */ @Override public T defaultCase(EObject object) { return null; } } //MappingSwitch